OpenBuildings™ Station Designer Help

Standards File Naming Utility

Available via configuration, the Standardized File Naming (SFN) utility allows you to quickly and automatically generate file, model, and view names that comply with various file naming conventions. You can also add your own standards and options via an XML file.

When enabled, the utility opens whenever you create a new DGN file, model, saved view, etc. providing you with fields to populate that are used to generate file/model/saved view names that comply with the naming conventions specified by the XMLs.

Enabling the Utility

To enable the utility, the following variables can be defined:

  • BB_NAMING_STANDARDS_ENABLE - If defined, enables you to create any file, model and/or view names which is controlled by a standard naming convention defined by BB_NAMING_STANDARDS_FILE.
  • BB_NAMING_STANDARDS_FILE - Defines the XML path and file which defines the standard naming convention used to create a prescriptive file, model or view names.
Other configuration variables can be set to provide default values rules in the SFN Utility.
  • BB_NAMING_STANDARDS_PROJECT_ID - Allows for a default Project ID/WorkSet ID to be preset in the Naming Standard Utility. If defined, you are not be able to edit the Project ID Project ID/WorkSet ID in the naming standards dialog.

Utility Dialog

Opens when creating a new file, or new model, saved view.

At this point, you may start entering valid data either by manual entry or drop-down lists. Once all required properties have valid entries confirmed (red text turns black), the "OK" button is enabled, and a preview of the generated file name will be displayed at the bottom of the dialog. Clicking OK copies this generated file name into the File Saving Dialog.

Utility XML File

The Standardized File Naming Utility dialogs settings are controlled by the XML file specified by the BB_NAMING_STANDARDS_FILE configuration variable.

Note: A sample Standardize File Naming utility XML file is provided by default (C:\Program Files\Bentley\OpenBuildings CONNECT Edition\OpenBuildingsStationDesigner\Default\Data\StandardsFilenameSetting.xml) You can use this sample file as a template to create your own file naming standards XML files.

This document provides the properties which control how a file name can be constructed with the SFN Utility. The XML Document itself is constrained by an XML schema, which can be found in [schema location]. This scheme specifies the following:

The XML Document must start with:
<?xml version=”1.0”?>
<SFNSettings Titles=”Some Title”>
Where “Some Title” can be replaced by any string, and will appear as the window title for the SFN Utility popup.
The <SFNSettings> node must have the following sub-nodes defined:
  • <Filename>
  • <Model>
  • <ModelDesign>
  • <ModelDrawing>
  • <ModelSheet>
  • <ModelNamedView>

These allow the SFN Utility to have different rulesets when creating names in each of the specified scenarios. Each of these nodes may have a GroupName and/or a ShowDesc attribute defined on them. The GroupName places a label on the group header, while ShowDesc is a true/false value which controls whether the description panel is visible when opening the SFN Utility.

For example:
<Filename GroupName=”FileNames” ShowDesc=”true”>
…
</FileName>
There is a root node SFNSettings. SFNSettings contains following unique nodes. These control nodes correspond to properties in the RPG. Under each of these ruleset nodes, any number of Control nodes may be defined. Each Control node corresponds to a unique property within that SFN popup window. Each control node can have numerous attributes(Attr), and orm and window condition nodes.. If the control node has a nonzero number of attributes, the editor for the property becomes a drop down list. If there are no attributes, then the editor is a textbox. A Control Node may have the following XML attributes applied to it.
XML Attributes - Elements Type | Required? Description
SFNSettings Titles: String | Required Originally there could be multiple windows, however now the property grid is just reloaded with new attributes so there is no reason to create a new form. This attribute determines what the titles of each of these windows are. If there are morewindows than titles, the last title is used for each subsequent window. The titles are comma delimited.
Label String | Required Provides a name to the property. The name needs to be unique across controls. If the same label is used more than once across controls, then only one control with that label will be displayed.
Order Integer | Optional Explicitly specify the order in which properties are listed in the grid. If no order is specified, then properties will appear in the order that they are listed in the XML document. The un-ordered properties are kept in place after the ordered properties in the grid.
CacheValue Boolean | Optional Set to true to specify that this property should remember the last entered value between uses of the SFN Utility
Prefix String | Optional Specifies a string that will precede the value for this property in the constructed file name. For example, Prefix=”_” with a value of “Building” will produce “_Building” in result filename.
Suffix String | Optional Specifies a string that will follow the value for this property in the constructed file name.
MinChars Integer | Optional Specify the minimum character length for the value of this property.
MaxChars Integer | Optional Specify the maximum character length for the value of this property.
Required Boolean | Optional Set to true in order to require a valid value for this property.
Extendable Boolean | Optional Set to true to allow users to enter their own values for a drop-down list property.
Format String | Optional Specify a format that restricts what type of characters may be used in user entered properties:
  • Alpha: English alphabet characters only
  • Numeric: Numbers containing only digits 0-9
  • AlphaNumeric: English alphabet characters or digits 0-9 only
Note: Each Control node must have a label attributes but may have any combination of optional attributes.
Each control node may have up to 3 types of sub-nodes:
  • <Desc>: If included, this sub-node will contain a description of the property visible in a panel at the bottom of the SFN Utility.
  • <Attr>: Each control node may have none of many Attr nodes. Including any Attr nodes will make that property appear as a drop-down list in the SFN Utility.
    • If the Value attribute is included, this is the value that will be included in the constructed file name.
    • Examples:
      • <Attr>Option1</Attr>
        Creates a drop-down list with a single item labeled Option1 which will include “Option1” in the final constructed filename.
      • <Attr Value=”O1”>Option1</Attr>
        Creates a drop-down list with a single item labeled Option1 which will include “O1” in the final constructed filename.
  • <Condition>: Determines when a property will be displayed in the SFN Utility. If Control node is specified, the property will always be visible. Condition nodes have the following possible attributes.
    • Type (string | required): Can be specified as “Form” to appear within the same window of the SFN Utility, or as “Window” to appear in a subsequent popup window.
    • ControlLabel (string | optional): Specify which control label must have a value in order for the current property to be displayed
    • Options (string | optional): Used in conjunction with ControlLabel to specify which options must be selected in the specified Control Label in order for the current property to be visible.
    • ControlVariable (string | optional): Specify the name of the Configuration Variable which will populate the property value.

.

Example Workflow

OpenBuildings Station Designer comes standard with an example XML document for SFN Utility configuration. You may also choose to create your own XML document to serve the same purpose.

Below is the start of an XML document for the SFN Utilitty.
<?xml version="1.0"?>
	<SFNSettings Titles="Standard File Naming Utility"> 
		<Filename GroupName="FileNames" ShowDesc="true" > 
			<Control Label="Project Number" Required="true" Order="0" MinChars="4" MaxChars="5" CacheValue="true" Prefix="">
				<Desc>Project Number</Desc> 
			</Control> 
			<Control Label="Discipline" Order="3" Required="true" CacheValue="true" Prefix="-"> 
				<Desc>Select from the following options</Desc> 
				<Attr Value="A" >Architectural</Attr> 
				<Attr Value="S" >Structural</Attr> 
				<Attr Value="M" >Mechanical</Attr> 
				<Attr Value="E" >Electrical</Attr> 
				<Attr Value="P" >Public Health</Attr> 
				<Attr Value="C" >Civil</Attr> 
			</Control> 
			<Control Label="Content Description" Order="4" MinChars="1" MaxChars="20" CacheValue="true" Prefix="_" Format="AlphaNumeric_"> 
				<Desc>Model Content Description (only characters A-Z,1,2,3... are allowed)</Desc> 
			</Control> 
		</Filename> 
		…
</SFNSettings>

Similar subnodes must also be created for Model, ModelDesign, ModelDrawing, ModelSheet, and ModelNamedView as specified above. Once the XML document has been created, save it to a folder location that is accessible to OpenBuildings Station Designer. Remember this file location!

Next, in the configuration variables, select the “File Saving” group and locate the variable named “BB_NAMING_STANDARDS_FILE”. Edit this variable to be the exact path of the XML file just created. Then select the “BB_NAMING_STANDARDS_ENABLE” variable and ensure its value is set to “true”.

The next time a new file is being created, the SFN Utility should pop up before the Save File Dialog appears. If an error message about the XML file appears, validate that the XML follows the specifications of the schema.